<template>
  <form-item :form-datas = "formDatas" :form-item = "field" :parent-comp-type = "parentCompType"
  >
    <el-button
        :auto-insert-space = "field.preps['autoInsertSpace']"
        :autofocus = "field.preps['autofocus']"
        :bg = "field.preps['bg']"
        :circle = "field.preps['circle']"
        :disabled = "field.preps['disabled']"
        :icon = "field.preps['icon']"
        :link = "field.preps['link']"
        :loading = "field.preps['loading']"
        :loading-icon = "field.preps['loadingIcon']"
        :native-type = "field.preps['nativeType']"
        :plain = "field.preps['plain']"
        :round = "field.preps['round']"
        :size = "field.preps['size']"
        :text = "field.preps['text']"
        :type = "field.preps['type']">{{ field.preps["btnLabel"] }}
    </el-button>
  </form-item>
</template>

<script>
import FormItem from "./form-item";

export default {
  name: "button-item",
  components: {FormItem},
  props: {
    field: {
      type: Object
    },
    formDatas: {type: Object}
  },
  data() {

  },
  methods: {
    selectItem(data) {
      let _this = this;
      _this.$emit("selectItem", data, _this.parentCompType);
    }
  }
}
</script>

<style scoped>

</style>